package com.fy.tt.entity.vo;


import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.util.Date;
import java.sql.ResultSet;
@Data
@NoArgsConstructor
@ToString
public class WordVo {
    private Long id;

    private String name;

    private Long creatorId;

    private Date updateTime;

    // 词汇类型 1：名词 2：动词 。。。
    private Long isTypeIn;

    // 词汇使用范围，目前代表分享状态 0：原生公共词汇（帮语平台） 1：其他帮区私有词汇  2：其他帮区拉取的公共词汇
    private Long isRange;

    // 涉及审核发布后的状态表示（暂不考虑）
    private Long status;

    private Long bandObjId;

    private String bandName;

    // 词汇用例说明描述
    private String description;

    public WordVo(ResultSet rs) {
        try {
            this.id = rs.getLong("id");
            this.name = rs.getString("name");
            this.creatorId = rs.getLong("creator_id") ;
            this.updateTime = rs.getTimestamp("update_time") ;
            this.isTypeIn = rs.getLong("is_type_in");
            this.isRange = rs.getLong("is_range");
            this.status = rs.getLong("status");
            this.bandName = rs.getString("band_name");
            this.bandObjId = rs.getLong("band_obj_id");
            this.description = rs.getString("description");
        }catch (Exception e){
            System.out.println(e.getCause());
        }
    }
}
